Alpha channel should be 1 by default, rather than 0 #2197
Conversation
Signed-off-by: pylee <penne.y.lee@intel.com>
|
Thanks for the contribution @pennelee ! Added the devdays25 label. |
Signed-off-by: pylee <penne.y.lee@intel.com>
…alpha_channel_one
|
Hi @cozdas , |
cozdas
left a comment
There was a problem hiding this comment.
Hi @pennelee,
The unit test expected values are now making much more sense, thanks for the fix but the value that needs to be used should be derived from the input bit depth, not output, I added comments to some of the relevant lines.
I believe the tests will still pass when you use the input depth instead of the output.
Signed-off-by: pylee <penne.y.lee@intel.com>
Signed-off-by: pylee <penne.y.lee@intel.com>
…alpha_channel_one
Signed-off-by: pylee <penne.y.lee@intel.com>
cozdas
left a comment
There was a problem hiding this comment.
Looks good to me, just added a minor suggestion.
Thanks for the fixes.
Co-authored-by: Cuneyt Ozdas <github@cuneytozdas.com> Signed-off-by: PenneLee <pennelee@gmail.com>
|
Hi @doug-walker - Could you also review the changes? Thank you! |
doug-walker
left a comment
There was a problem hiding this comment.
Thanks for pushing through on this @pennelee , it was a challenging one!
Related to issue #1781.
For CPU processor, when source has no alpha (RGB) but dest does (RGBA) make it default to 1.
GPU Processors (new and legacy) did not seem to have this issue, alpha was already set to 1. Let me know if this is not the case.
Tested changes with ocioconvert and changed the output to force RGBA, since the default is to use inplace conversion (did not check in those changes).
Tested with all the ocioconvert test cases (basic, --lut, --view, --invertview --namedtransform, --invnamed transform), and various EXR file sizes.
Before the changes alpha would be 0, so image was not viewable. After the changes then images can be viewed and from inspection the alpha channel is now 1.0.
Also updated related CPU tests to reflect non zero alpha values.